/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package compilador.AnalisadorSintatico;

import compilador.AnalisadorSemantico.Semantico;
import compilador.*;
import compilador.AnalisadorLexico.Lexico;

/**
 *
 * 
 * @author Leles
 */
public class Sintatico {

    static Lexico lex;
    static Semantico sem;
    
    //static 
    
    public Sintatico(String inputFile, String tempOutputFile, String tempOutputFileExtension) {
        lex = new Lexico(inputFile);
        sem = new Semantico(tempOutputFile, tempOutputFileExtension);
        
        //run();
    }
    
    public boolean run (){
   
        SM_Program S1 = new SM_Program();
        try { S1.run(null); }
        catch (RuntimeException e) {
            System.out.println (e);
        }
        
        sem.EscreveCodigo();
        
        return true;
    }
  
}
